﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DbCommon;
using System.Web.Services;
using Web.UI;

namespace Web.frontpage.SignUp.right
{
    public partial class SignUped : SignUpPage
    {
        protected string pagecount;
        public DateTime time = new DateTime();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                time = DateTime.Now;
                pagecount = Convert.ToString(SQLHelper.GetRecordCount("v_StudentToContest", "PAR_STUDENTS='" + Session["studentId"] + "' and CON_ENDTIME >'" + time + "'"));
            }
        }
        [WebMethod]
        public static string Cancel(string STU_ID, string PAR_GROUPS,string PAR_CONTESTS)
        {
            BLL.ParticipantService participantservice = new BLL.ParticipantService();
            if(participantservice.RemoveParticipant(STU_ID, PAR_GROUPS,PAR_CONTESTS))
                return "{'resultJson':'取消成功','state':'1'}";
            else
                return "{'resultJson':'取消失败','state':'0'}";
        }
    }
}  